package com.eian.boot.module.system.associations.role.permission.event;

import lombok.Getter;
import org.springframework.context.ApplicationEvent;

import java.util.List;

/**
 * 权限解绑事件
 * 当权限被删除导致其与所有角色的关系被清理时触发
 *
 * @author alex.meng
 * @since 1.0.0
 */
@Getter
public class PermissionUnassignedEvent extends ApplicationEvent {

    private final Long permissionId;
    private final List<Long> roleIds;

    public PermissionUnassignedEvent(Object source, Long permissionId, List<Long> roleIds) {
        super(source);
        this.permissionId = permissionId;
        this.roleIds = roleIds;
    }
}

